\mode<presentation>

% Title page
\defbeamertemplate*{title page}{sjtug}[1][]
{
  \nointerlineskip%
  \begin{beamercolorbox}[wd=\paperwidth, ht=\paperheight]{empty}
    \usebeamercolor{frametitle}% 
    \begin{tikzpicture}
      \pgfmathsetlengthmacro{\outslant}{\the\paperwidth - 0.8cm}
      \node[anchor=north west, inner sep=0, outer sep=0] at (0,\the\paperheight){\includegraphics[height=\paperheight]{title-background.jpg}};
      \fill[color=white] (0,0) rectangle(\the\paperwidth,3.9);
      \fill[color=bg]  (0,0) rectangle(\the\paperwidth,3.88);
      \node[anchor=north west, text width=.8\paperwidth, fg] at (0.8,3.6){%
        \ifx\insertsubtitle\@empty%
          {\huge\bfseries\inserttitle}\\
        \else%
          {\Large\bfseries\inserttitle}\\
          {\small\insertsubtitle}\\
        \fi%
      };
      \node[anchor=south west, text width=.8\paperwidth, fg] at (0.8,0.45){%
        {\small\insertauthor}\\
        {\small\insertinstitute}\\
        {\small\insertdate}%
      };
      \node[anchor=south east, inner sep=0, outer sep=0] at (\outslant,0.5){\includegraphics[height=1cm]{sjtu-logo-white.pdf}};
    \end{tikzpicture}
  \end{beamercolorbox}
}

% Items
\setbeamertemplate{enumerate items}[circle]
\setbeamertemplate{itemize items}{\Large $\bullet$}
\setbeamertemplate{sections/subsections in toc}[circle]

\setbeamertemplate{itemize item}{\raise1.25pt\hbox{\tikz\draw[fill=fg] (0,0) circle (.3ex);}}
\setbeamertemplate{itemize subitem}{\color{fg}\tiny\raise1.25pt\hbox{\donotcoloroutermaths$\blacktriangleright$}}
\setbeamertemplate{itemize subsubitem}{\raise2.5pt\hbox{\tikz\draw[fill=fg] (0,0) rectangle (.7ex, .2ex);}}

\mode<all>
